<?php global $options; foreach ($options as $value) {if (get_settings( $value['id'] ) === FALSE) { $$value['id'] = $value['std']; } else { $$value['id'] = get_settings( $value['id'] ); }}?>


			 <?php query_posts('category_name=' . $pl_category . '&showposts=' . $pl_count . '');?>

<div class="slider2_container">
	<div class="coda_inner">



		<div class="coda_rotator">


			<div id="slider" class="sliderwrapper">
			 <?php while (have_posts()) : the_post(); if (current_user_can('level_2')) {} else {if (in_category('private')) continue;}
			if ($images = get_children(array(
				'post_parent' => $post->ID,
				'numberposts' => '1',
				'post_type' => 'attachment',
				'post_mime_type' => 'image',
				'order' => 'ASC',
				'orderby' => 'menu_order')))  
			 foreach($images as $image) {  
				$featured_image = $image->guid; 
				} else {
				$featured_image = site_url('/wp-content/themes/exehill2/images/coda_noimage.png');
				} ?>
				
				
				<div class="contentdiv">
			
					

						
		
						
							<div class="coda_image" style="background: url(<?php echo $featured_image; ?>) no-repeat; "><a  href=" <?php if ( $exelink = get_post_meta($post->ID, 'link', true)) {echo $exelink; } else {the_permalink();}?>" class="toc"></a>
							</div>
							


				</div>
			
			
			<?php endwhile; ?>

			</div>

		</div>
	<div id="paginate-slider" class="coda_pagination">
	 <?php
			 query_posts('category_name=' . $pl_category . '&showposts=' . $pl_count . '');
			 while (have_posts()) : the_post(); if (current_user_can('level_2')) {} else {if (in_category('private')) continue;}
			if ($images = get_children(array(
				'post_parent' => $post->ID,
				'numberposts' => '1',
				'post_type' => 'attachment',
				'post_mime_type' => 'image',
				'order' => 'ASC',
				'orderby' => 'menu_order')))  
			 foreach($images as $image) {  
				$exehill_thumb = wp_get_attachment_thumb_url( $image->ID);			
				} else {
				$exehill_thumb = site_url('/wp-content/themes/exehill2/images/noimage.png');
				}				
			    ?>


	<div onmouseover="Tip('<strong><?php the_title(); ?></strong></br>Posted by <?php the_author(); ?> on <?php the_time('M j, Y') ?> with <?php comments_number('0 responses', '1 response', '% responses' );?>')" onmouseout="UnTip()"><a href="<?php the_permalink(); ?>" class="toc"><img src="<?php echo $exehill_thumb; ?>" alt="Thumb" title="title" style="width:38px; height:23px; "/></a></div>
	
	<?php endwhile; ?>

	</div>
	<div class="slider2_info"><a href="<?php bloginfo('home'); ?>/category/<?php echo $pl_category; ?>/"><?php if ($exehill_cat_link) { echo $exehill_cat_link; } else { ?>View all posts in <?php echo $pl_category; ?><?php } ?></a></div>

<script type="text/javascript">
featuredcontentslider.init({
	id: "slider", 
	contentsource: ["inline", ""],  
	toc: "markup",  
	nextprev: ["Previous", "Next"], 
	revealtype: "mouseover",
	enablefade: [true, 0.2],  
	autorotate: [<?php echo $benzo_slider_rotation; ?>, <?php echo $benzo_slider_duration; ?>],  
	onChange: function(previndex, curindex){ 
	}
})
</script>
	
	</div><div class="clear"></div>	</div>


